﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Alos.Entity;
using Alos.IRepository;
using PetaPoco;

namespace Alos.Repository
{
    public class ReExamSubjectRepository : BaseRepository<ReExamSubject>, IReExamSubjectRepository
    {
        /// <summary>
        /// 新增1条课堂测验题目表
        /// </summary>
        /// <param name="ReExamSubject">课堂测验题目表</param>
        /// <returns></returns>
        public bool CreatReExamSubject(ReExamSubject ReExamSubject)
        {
            var sql = Sql.Builder.Append(@"insert into ReExamSubject(ExamID,LessionID,TeacherID,QtypeCode,QtypeName,QuestionID,ComID,Number) values(@0,@1,@2,@3,@4,@5,@6,@7) ", ReExamSubject.ExamID, ReExamSubject.LessionID, ReExamSubject.TeacherID, ReExamSubject.QtypeCode, ReExamSubject.QtypeName, ReExamSubject.QuestionID, ReExamSubject.ComID, ReExamSubject.Number);

            return DBContext.Execute(sql) > 0 ? true : false;

        }
    }
}
